package com.authority.utils;

import org.springframework.web.context.ContextLoader;
import org.springframework.web.context.WebApplicationContext;

public class BeanUtil {
    private static WebApplicationContext context=ContextLoader.getCurrentWebApplicationContext();
    public static  Object getBean(String beanName){
	if(context==null)context = ContextLoader.getCurrentWebApplicationContext();
        return context.getBean(beanName);
    }
}
